Skip to content

Try for IEEE754-precise poly2tri triangulation results#4500

Draft
roystgnr wants to merge 16 commits into
libMesh:develfrom
roystgnr:non_associative_poly2tri
Draft

Try for IEEE754-precise poly2tri triangulation results#4500
roystgnr wants to merge 16 commits into
libMesh:develfrom
roystgnr:non_associative_poly2tri

Conversation

@roystgnr

Copy link
Copy Markdown
Member

@loganharbour is experimenting with adding CXXFLAGS for Haswell architecture compiler optimizations, and the fused-multiply-add instructions there are (via rounding differently) changing MOOSE XYDelaunay outputs. Compiling the whole thing with -ffp-contract=off fixes the problem, but we do want to allow fused-multiply-add in most of our code, so let's see if we can just disable non-IEEE754-compliant optimizations selectively.

Leaving this marked as draft until Logan can verify that it works for him.

@moosebuild

moosebuild commented Jul 21, 2026

Copy link
Copy Markdown

Job Coverage, step Generate coverage on a286353 wanted to post the following:

Coverage

421597 #4500 a28635
Total Total +/- New
Rate 65.65% 65.65% +0.00% -
Hits 78738 78739 +1 0
Misses 41207 41206 -1 0

Diff coverage report

Full coverage report

This comment will be updated on new commits.

@roystgnr

Copy link
Copy Markdown
Member Author

It turns out that this is insufficient, and even compiling all of src/mesh and src/numerics with safer FP arithmetic is insufficient, but if I also build all of src/geom with -ffp-contract=off then I finally get reproduceable triangulations in even unsafely-optimized MOOSE builds.

I'm not sure if I want to disable FMA optimizations for every single geometric calculation. I may have to make push/pop versions of those pragmas, and put them into enforce_ieee754.h and unenforce_ieee754.h or something, so I can start wrapping individual methods. Figuring out which individual methods need wrapping is going to take a while too.

@roystgnr

Copy link
Copy Markdown
Member Author

Still haven't had much time to play with this, but I at least checked that the rest of src/mesh and src/numerics were overkill; all we need is the stuff in this PR plus some subset of src/geom

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants